home *** CD-ROM | disk | FTP | other *** search
- Path: news.ov.com!news
- From: glenn@ov.com (Fletcher.Glenn@ov.com)
- Newsgroups: comp.lang.c
- Subject: Re: pointers
- Date: 28 Feb 1996 17:02:21 GMT
- Organization: OpenVision
- Message-ID: <4h21qt$rfa@spanky.pls.ov.com>
- References: <4gqh8g$bo4@news.bu.edu>
- Reply-To: glenn@ov.com
- NNTP-Posting-Host: foghorn.pls.ov.com
-
- In article bo4@news.bu.edu, lachesis@cs.bu.edu (wai yip) writes:
- >can someone who knows a lot about pointers help me with this
- >
- >int i=3,*p;
- >
- >with the above declaration, what would the bottom lines do?
- >*p=&i;
-
- The above is the same as (whatever location p points to) = &i.
-
- >p=i;
-
- The above puts the integer value 3 into p, p then points to address 3.
- Not all compilers will allow this, and most will warn you of a suspicious
- pointer assignment.
-
- >*p=i;
-
- The above is the same as (whatever location p points to) = i.
-
- >p=&i;
-
- The result of the above will be that p points to i.
-
- Fletcher.Glenn@ov.com
-
- >
- >please answer me through email because i don't usually read newsgroups.
-
-
-
-
-
-